package com.qys.livesMall.shop.dao.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qys.livesMall.shop.dao.H2ShopContractDao;
import com.qys.livesMall.shop.mapper.H2ShopContractMapper;
import com.qys.livesMall.shop.modal.entity.H2ShopContract;
import org.springframework.stereotype.Service;

/**
 * @menu H2ShopBaseDaoImpl
 * @date 2023/05/26 11:08
 */
@Service
public class H2ShopContractDaoImpl extends ServiceImpl<H2ShopContractMapper, H2ShopContract> implements H2ShopContractDao {


    @Override
    public H2ShopContract getByShopId(Long shopId) {
        LambdaQueryWrapper<H2ShopContract> qw=new LambdaQueryWrapper<>();
        qw.eq(H2ShopContract::getShopId,shopId);
        qw.last("limit 1");
        return getOne(qw);
    }
}

